home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / Information / CSMP Digest / volume 1 / csmp-v1-148.txt < prev    next >
Encoding:
Text File  |  1994-12-08  |  43.0 KB  |  1,153 lines  |  [TEXT/R*ch]

  1. C.S.M.P. Digest             Thu, 23 Jul 92       Volume 1 : Issue 148
  2.  
  3. Today's Topics:
  4.  
  5.     THINK Pascal and debugging Time Manager Calls
  6.     ViewEdit Blues
  7.     More CTB Questions
  8.     How many lasers in chooser?
  9.     appe info wanted
  10.     Setting SIZE Resource from MPW
  11.     TMON typ# TMPL?
  12.     MacApp 3.0 and Dialog Views
  13.     Address error
  14.  
  15.  
  16.  
  17. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  18.  
  19. The digest is a collection of article threads from the internet newsgroup
  20. comp.sys.mac.programmer.  It is designed for people who read c.s.m.p. semi-
  21. regularly and want an archive of the discussions.  If you don't know what a
  22. newsgroup is, you probably don't have access to it.  Ask your systems
  23. administrator(s) for details.  (This means you can't post questions to the
  24. digest.)
  25.  
  26. Each issue of the digest contains one or more sets of articles (called
  27. threads), with each set corresponding to a 'discussion' of a particular
  28. subject.  The articles are not edited; all articles included in this digest
  29. are in their original posted form (as received by our news server at
  30. cs.uoregon.edu).  Article threads are not added to the digest until the last
  31. article added to the thread is at least one month old (this is to ensure that
  32. the thread is dead before adding it to the digest).  Article threads that
  33. consist of only one message are generally not included in the digest.
  34.  
  35. The entire digest is available for anonymous ftp from ftp.cs.uoregon.edu
  36. [128.223.8.8] in the directory /pub/mac/csmp-digest.  The most recent issues
  37. are available from sumex-aim.stanford.edu [36.44.0.6] in the directory
  38. /info-mac/digest/csmp.  If you don't have ftp capability, the sumex archive
  39. has a mail server; send a message with the text '$MACarch help' (no quotes)
  40. to LISTSERV@ricevm1.rice.edu for more information.
  41.  
  42. The digest is also available via email.  Just send a note saying that you
  43. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  44. automatically receive each new issue as it is created.  Sorry, back issues
  45. are not available through the mailing list.
  46.  
  47. Send administrative mail to mkelly@cs.uoregon.edu.
  48.  
  49.  
  50. -------------------------------------------------------
  51.  
  52. From: cfranz@iiic.ethz.ch (Christian Steffen Ove Franz)
  53. Subject: THINK Pascal and debugging Time Manager Calls
  54. Organization: Dept. Informatik, Swiss Federal Institute of Technology (ETH)
  55. Date: Thu, 11 Jun 1992 16:24:44 GMT
  56.  
  57.  
  58. I need some help in debugging a THINK Pascal program. I am using the TimeManager
  59. to schedule a process say 2 secs in the future. When the timer counts down, my
  60. routine gets called during interrupt. 
  61.  
  62. The first thing I do is to restore the A5 world (as mentioned in IM VI) to access
  63. the globals. No matter what I do, the program will bomb. Especially if I placed
  64. a breakpoint inside the procedure that gets executed during interrupt. Since I want
  65. my program to execute in the background every so often I must be relying on the
  66. time manager. Hence I need to debug the program. How can I do that? Is there 
  67. something I overlooked in the manual (an arcane compiler option maybe?)
  68.  
  69. Thanks for your help.
  70.  
  71. Cheers,
  72. Christian
  73.  
  74. - -- 
  75. - -----------------------------------------------------------------------------
  76. Christian S. O. Franz                 |                   cfranz@iiic.ethz.ch
  77. ETH Zuerich, Swizerland               |                     vismgr@rz.ethz.ch
  78.  
  79. +++++++++++++++++++++++++++
  80.  
  81. From: siegel@world.std.com (Rich Siegel)
  82. Organization: GCC Technologies
  83. Date: Thu, 11 Jun 1992 20:02:41 GMT
  84.  
  85. In article <1992Jun11.162444.9152@neptune.inf.ethz.ch> cfranz@iiic.ethz.ch (Christian Steffen Ove Franz) writes:
  86.  
  87. >the globals. No matter what I do, the program will bomb. Especially if I placed
  88. >a breakpoint inside the procedure that gets executed during interrupt. Since I want
  89. >my program to execute in the background every so often I must be relying on the
  90.  
  91.     You can't use the THINK Pascal debugger to deubg interrupt level
  92. routines, and interrupt level routines written in Pascal will crash the
  93. system if you run them under the environment with debugging turned on.
  94. Place a {$Push} {$D-} in front of the procedure heading for any code
  95. to be executed at interrupt time, and {$Pop} after the end of the procedure.
  96.  
  97. R.
  98.  
  99.  
  100.  
  101. - -- 
  102. - -----------------------------------------------------------------------
  103. Rich Siegel                              Internet: siegel@world.std.com
  104. Software Engineer & Toolsmith
  105. GCC Technologies
  106.  
  107. +++++++++++++++++++++++++++
  108.  
  109. From: jpugh@apple.com (Jon Pugh)
  110. Date: 19 Jun 92 21:44:19 GMT
  111. Organization: Apple Co.
  112.  
  113. In article <1992Jun11.162444.9152@neptune.inf.ethz.ch>, cfranz@iiic.ethz.ch (Christian Steffen Ove Franz) writes:
  114. > I need some help in debugging a THINK Pascal program. I am using the TimeManager
  115. > to schedule a process say 2 secs in the future. When the timer counts down, my
  116. > routine gets called during interrupt. 
  117. > The first thing I do is to restore the A5 world (as mentioned in IM VI) to access
  118. > the globals. No matter what I do, the program will bomb. Especially if I placed
  119. > a breakpoint inside the procedure that gets executed during interrupt. Since I want
  120. > my program to execute in the background every so often I must be relying on the
  121. > time manager. Hence I need to debug the program. How can I do that? Is there 
  122. > something I overlooked in the manual (an arcane compiler option maybe?)
  123.  
  124. You CANNOT use the debugger at interrupt time.  Don't even try.  In fact,
  125. you should turn off the debugging code for that routine like so:
  126.  
  127. {$PUSH}
  128. {$D-}
  129. PROCEDURE Boogers;
  130. BEGIN
  131. END;
  132. {$POP}
  133.  
  134. This will make sure you don't get any debugger code in there.
  135.  
  136. As for debugging the sucker, use the tried and true method of making it so
  137. simple it canUt fail (see the code above for an example that CANNOT fail)
  138. and then adding stuff until it breaks.  When it does, back up and try again.
  139. It ain't sophisticated, but it works.
  140.  
  141. The trick (IMHO) to writing interrupt routines is to keep them SHORT and
  142. clean and to build them slowly.  Be prepared to reboot often.
  143.  
  144. Jon
  145.  
  146. ---------------------------
  147.  
  148. From: gray@tinman.asel.udel.edu (John Gray)
  149. Subject: ViewEdit Blues
  150. Organization: AI duPont Inst.
  151. Date: Tue, 16 Jun 1992 16:31:47 GMT
  152.  
  153. ViewEdit can be a real pain. Does anyone know how to edit things you can't see.
  154. I realize I can get to views that are obstructed by other views but I can't
  155. figure out how to get to view with size 0,0.  Or another case is a 
  156. TextListView which is set to initailly have zero columns.  The only thing
  157. I seem to be able to do is delete the superview and then create the super
  158. view and the view in question all over again ( along any other subviews the
  159. superview may have had. )
  160.  
  161. Another thing that a find a little odd is that ViewEdit won't create certain
  162. things.  For instance if you look at the DemoDialogs example app.  Derez
  163. the Format Dialog, then try to create a similiar one with ViewEdit and Derez
  164. it.  I can't make them match.  There are fields that are different in the
  165. two that ViewEdit does not allow me to change (or View for that manner).
  166. When all the fields I do have control over are set to be the same, the two
  167. do not behave the same.  One field in particular is a hex value at the
  168. end of the adorners list.
  169. Any suggestion would be appreciaged.
  170.  
  171. Thanks
  172. John Gray
  173. gray@asel.udel.edu
  174.  
  175. +++++++++++++++++++++++++++
  176.  
  177. From: fgiraffe@well.sf.ca.us (Frank Giraffe)
  178. Organization: Whole Earth 'Lectronic Link
  179. Date: Wed, 17 Jun 1992 02:44:06 GMT
  180.  
  181.  
  182. John,
  183. Are you editing views for MacApp 2 or 3? There is a nice 3rd Party app
  184. called IcePick that edits MacApp 2 views (a upgrade for 3.0 views is
  185. promised "Real Soon"). It's available from MADA.
  186. - -- 
  187. >Frank Giraffe- fgiraffe@well.sf.ca.us - {apple,pacbell,ucbvax}!well!fgiraffe
  188. >As the noose of narco-militarism tightens 'round our necks, we worry about
  189. >  burning flags and pee in jars at work to keep our jobs.  -- Jello Biafra
  190.  
  191. +++++++++++++++++++++++++++
  192.  
  193. From: eyes@cs.ubc.ca (Eye Care Centre)
  194. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  195. Date: Sat, 20 Jun 92 04:05:27 GMT
  196.  
  197. In article <1992Jun17.024406.27584@well.sf.ca.us> fgiraffe@well.sf.ca.us (Frank Giraffe) writes:
  198. >
  199. >Are you editing views for MacApp 2 or 3? There is a nice 3rd Party app
  200. >called IcePick that edits MacApp 2 views (a upgrade for 3.0 views is
  201. >promised "Real Soon"). It's available from MADA.
  202.  
  203. A quick correction: IcePick has been sold by KPMG*ExIS to Apple to serve as
  204. a ViewEdit replacement for MacApp 3. MADA, which was distributing it, is/was
  205. examining possible legal actions against KPMG*ExIS for acting in bad faith 
  206. (promising a 3.0-compatible version but not delivering). The sordid details 
  207. (well, some) are in the latest issue of FrameWorks.
  208.  
  209. The bottom line is: Don't buy IcePick. However, there is a program called AdLib
  210. by Nick Nallick which MADA is attempting to secure the distribution rights for.
  211. It is described as "a view resource editor on steroids".
  212.  
  213. Bill Kiss
  214. Programmer/Lab flunkie
  215. Dept. of Ophthalmology, UBC
  216.  
  217. Disclaimer: A miffed IcePick purchaser.
  218.  
  219. ---------------------------
  220.  
  221. From: sakelley@euclid.ucsd.edu (Scott Kelley)
  222. Subject: More CTB Questions
  223. Date: 16 Jun 92 19:07:06 GMT
  224.  
  225. I'm trying to implement a simple Telnet client using the CTB. It needs
  226. to be implemented as an XObject that can be called from MacroMind
  227. Director. I posted to the net a few weeks ago, and everyone recommended
  228. that I look into the Communications Toolbox. So far it looks very good,
  229. and it looks like I'll be able to do a lot less work than I had
  230. originally thought I would have to do.
  231.   The question I'm stuck on is this: Where do I get a MacTCP tool? As
  232. far as I can tell, Apple doesn't sell one. (Or, if they do, the person I
  233. just talked to at APDA didn't know it. They may have one listed in the
  234. catalog...?). Is this something I need to buy from a third party? If so,
  235. can anybody direct me to the companies that would sell it?
  236.   I'm also a little bit puzzled-- the CTB says it knows about a "MacTCP
  237. Tool" when I ask it... I assume it's responding to the MacTCP tool that
  238. I have installed as part of MacX? And didn't I hear on the net that that
  239. tool is hardcoded to port 6000?
  240.   Thanks for any help or suggestions...
  241.  
  242. Scott
  243.  
  244. - -------------------------------------------------
  245. Scott Kelley, sakelley@ucsd.edu, (619) 534-8560
  246. Multimedia Interactive Learning Laboratory (MILL)
  247. Department of Biology, UC San Diego
  248. - -------------------------------------------------
  249.  
  250. +++++++++++++++++++++++++++
  251.  
  252. From: major@bbn.com (John Major)
  253. Date: 17 Jun 92 17:18:20 GMT
  254. Organization: Bolt Beranek and Newman Inc., Cambridge MA
  255.  
  256.  
  257. To use Telnet with MacTCP and the Comm Toolbox, use one of the third
  258. party Connection Tools - Versaterm Telnet Tool from Synergy Software,
  259. or TCPak from Advanced Software Concepts (a French gang). They are
  260. both excellent. The MacTCP Tool that comes with MacX I know will only
  261. work with MacX, and now you've told me why - "hardwired for port 6000",
  262. eh?
  263.  
  264. Good luck -
  265. John Major
  266. major@bbn.com
  267. ALINK:D6590
  268. 617/873-8165
  269.  
  270. ps. Keep in mind that you will be talking to the Telnet tool through
  271. the CTB, so will not be able to do IP-specific programming. On the
  272. other hand, your XObject will be able to run over LAT, Serial, Modem,
  273. DecNet, ESP, whatever!
  274.  
  275. +++++++++++++++++++++++++++
  276.  
  277. From: raynaud@sun7c.lri.fr (Alain Raynaud)
  278. Date: 19 Jun 92 12:20:11 GMT
  279. Organization: LRI - Univ. Paris-Sud / CNRS URA 410
  280.  
  281. In article <l3ususINNmbe@news.bbn.com>, major@bbn.com (John Major) writes:
  282. |> 
  283. |> To use Telnet with MacTCP and the Comm Toolbox, use one of the third
  284. |> party Connection Tools - Versaterm Telnet Tool from Synergy Software,
  285. |> or TCPak from Advanced Software Concepts (a French gang). They are
  286. |> both excellent. The MacTCP Tool that comes with MacX I know will only
  287. |> work with MacX, and now you've told me why - "hardwired for port 6000",
  288. |> eh?
  289.  
  290. Well, this is not perfectly correct : you can tell the MacTCP Tool of
  291. MacX to use another port. There is standard call of the Comm Toolbox that
  292. gets a string representing the configuration of the tool. Guess what : that
  293. string contains something like "RemoteTCPPort 6000". Just change that
  294. (by another standard call) and you will get connections with whatever
  295. port you want (I tried it with ftp, telnet and NNTP).
  296.  
  297. The only problem is : I don't know of a Comm Program that let's you modify
  298. the configuration string of a tool.
  299.  
  300. Alain Raynaud
  301.  
  302. ---------------------------
  303.  
  304. From: gregf@shaman.sps.mot.com (Greg Ferguson)
  305. Subject: How many lasers in chooser?
  306. Date: 16 Jun 92 18:46:38 GMT
  307. Organization: SPS
  308.  
  309. Hi,
  310.  
  311. Well, my DEVELOP CD is spinning away as On-Location tyies to find a reference  
  312. to the buffer size allocated for printer names in the chooser.
  313.  
  314. Seems to me that I read info about that just recently, but beats me where it  
  315. was. Can anyone point me to the right info?
  316.  
  317. I need: size of the buffer, or maxlength of the printer names and number of  
  318. printers allowed.
  319.  
  320. Thanks,
  321.  
  322. Greg Ferguson
  323. rtmd30@email.sps.mot.com
  324. gregf@shaman.sps.mot.com
  325. - -- 
  326. ......POSTED VIA MOTOROLA SPS NEWS SERVER.......
  327.  
  328. +++++++++++++++++++++++++++
  329.  
  330. From: gregf@shaman.sps.mot.com (Greg Ferguson)
  331. Date: 19 Jun 92 19:45:25 GMT
  332. Organization: SPS
  333.  
  334. Summary of responses to request for information on Chooser limitations
  335. and buffer sizes and number of devices available for display. 
  336.  
  337. Thanks for the responses,
  338.  
  339. Greg Ferguson
  340. Motorola, Inc.
  341.  
  342. =====[ attachments ]===============
  343.  
  344. Date: Wed, 17 Jun 92 11:13:18 CDT
  345. From: "john  cavallino" <uunet!midway.uchicago.edu!jcav>
  346. To: gregf@shaman.sps.mot.com
  347. Subject: Re: How many lasers in chooser?
  348. Newsgroups: comp.sys.mac.programmer
  349. In-Reply-To: <1992Jun16.184638.14912@newsgate.sps.mot.com>
  350. Organization: The Royal Society for Putting Things on Top of Other Things
  351. Cc: 
  352.  
  353. In article <1992Jun16.184638.14912@newsgate.sps.mot.com> you write:
  354. >Well, my DEVELOP CD is spinning away as On-Location tyies to find a reference  
  355. >to the buffer size allocated for printer names in the chooser.
  356. >
  357. >Seems to me that I read info about that just recently, but beats me where it  
  358. >was. Can anyone point me to the right info?
  359. >
  360. >I need: size of the buffer, or maxlength of the printer names and number of  
  361. >printers allowed.
  362.  
  363. I've appended two articles that go into exhaustive detail about Chooser
  364. limitations.  The first one talks about the Chooser in System 6, the second
  365. discusses System 7.  Hope this helps.
  366.  
  367.     JohnC
  368.  
  369. - ------------------------------------------------------------------------------ 
  370. - -
  371. John Cavallino                  |  EMail: jcav@midway.uchicago.edu
  372. University of Chicago Hospitals |          
  373. John_Cavallino@uchfm.bsd.uchicago.edu
  374. Office of Facilities Management | USMail: 5841 S. Maryland Ave, MC 0953
  375. B0 f++ c+ g+ k s++ e+ h- pv     |         Chicago, IL  60637
  376.  
  377.  
  378. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  379.  
  380. Article 11085 of comp.sys.mac.system:
  381. Xref: midway comp.sys.novell:3568 comp.sys.mac.system:11085  
  382. comp.protocols.appletalk:3449
  383. Path:  
  384. midway!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!sample.eng.ohio-sta 
  385. te.edu!purdue!bu.edu!olivea!apple!aux.support.apple.com!winders
  386. From: winders@aux.support.apple.com (Scott Winders)
  387. Newsgroups: comp.sys.novell,comp.sys.mac.system,comp.protocols.appletalk
  388. Subject: Re: Apple Chooser Limitation problem???
  389. Message-ID: <58720@apple.Apple.COM>
  390. Date: 17 Oct 91 17:11:05 GMT
  391. Sender: daemon@Apple.COM
  392. Distribution: usa
  393. Organization: Apple Computer, Inc.
  394. Lines: 118
  395.  
  396. System 6.0.x Chooser Limitations
  397.  
  398. The following information is true for Chooser versions 3.x:
  399.  
  400. The Chooser DA window consists of 5 separate sections:
  401.  
  402. 1. The device type list. 
  403. 2. The AppleTalk zone list (only visible if there are multiple zones). 
  404. 3. The user name box. 
  405. 4. The AppleTalk active/inactive controls. 
  406. 5. The available devices name list.
  407.  
  408. 1. The Chooser is able to display a maximum of 16 items in the
  409. Chooser device type list. This is the limit that is imposed by the
  410. Chooser itself, not by something interfering with the operation of
  411. the Chooser.
  412.  
  413. 2. The Chooser allocates memory for the zone list dynamically, up to
  414. 32K. Each entry in the zone list takes up 1 byte of memory for each
  415. character in the zone name plus 1 byte. The Chooser uses this extra
  416. byte as a length byte. For example, the 7 character zone name "My
  417. Zone" takes up 8 bytes of memory: 7 bytes for the characters and 1
  418. byte for the length byte. The maximum length of a zone name is 32
  419. characters. A 32 character zone name will take up 33 bytes of memory.
  420.  
  421. Based on this information, if every zone had a 32 character name, it
  422. would be possible to have a maximum of 992 zones listed in the
  423. Chooser (32K / 33 = 992.97, remove the remainder). The maximum number
  424. of zones that may be displayed in the Chooser is wholly dependent on
  425. the length of the zone names being used.
  426.  
  427. 3. The user name may be a maximum of 31 characters long.
  428.  
  429. 4. This one is self explanatory; it controls whether or not AppleTalk
  430.    is active.
  431.  
  432. 5. Determining the maximum number of visible Chooser device names:
  433.  
  434. System 5.x and 6.x Choosers allocate a 512 byte buffer for
  435. containing the Chooser's list of available AppleTalk network device
  436. names. Each name in the buffer is embedded in an AppleTalk Name
  437. Binding Protocol (NBP) packet received by the chooser from the
  438. selected device type. The NBP packet is called a lookup reply and is
  439. sent in answer to the Chooser's lookup broadcast for the selected
  440. device. An example is the selection of the device type LaserWriter
  441. driver and the displayed LaserWriter object names.
  442.  
  443. It is due to the filling of the 512 byte buffer that sometimes
  444. causes various names in the Chooser selection window to appear and
  445. disappear. When selecting the LaserWriter driver in this situation, a
  446. LaserWriter will disappear and another appear approximately once each
  447. 1.5 seconds. This happens whenever there are more names than the
  448. buffer can hold. Because the lookups are usually sent in a series,
  449. whenever a device will not fit on the display list, the first reply
  450. received from a previous lookup is removed and replaced with the name
  451. of the device that did not fit. This process will continue for each
  452. following lookup broadcasted by the Chooser. While the display list
  453. is also limited to 32 names, this is never reached when displaying
  454. devices like LaserWriters because even with 1 character per name the
  455. buffer will be filled when 22 LaserWriters are displayed.
  456.  
  457. If the constantly appearing and disappearing LaserWriter situation
  458. is encountered by a customer, the customer can either break their
  459. network up into zones containing smaller numbers of the particular
  460. device or reduce the lengths of some or all of the device names.
  461.  
  462. The buffer space used by each returned AppleTalk device is the
  463. length of the NBP reply packet returned by the device to the
  464. Chooser's lookup.
  465.  
  466. NBP LaserWriter LookUp Reply PACKET definition
  467. - ---------------------------------------------- 
  468. Function and Tuple Count:       1 byte 
  469. NBP ID:                         1 byte 
  470. Network number:                 2 bytes 
  471. Node ID:                        1 byte 
  472. Socket Number:                  1 byte
  473. Enumerator:                     1 byte 
  474. Object Field Length:            1 byte
  475. Object:                         length of name
  476. Type Field Length:              1 byte 
  477. Type:                           11 bytes for type "LaserWriter"
  478. Zone Field Length:              1 byte 
  479. Zone:                           1 byte for zone "*" the NBP reply default
  480. - ---------------------------------------------------------------------------
  481. TOTAL                           22 bytes + length of the
  482. LaserWriter's name
  483.  
  484. A calculation for determining the maximum number of visible
  485. LaserWriters in a zone:
  486.  
  487. Number of visible LaserWriters = trunc(512/(22+(sum of name lengths
  488. / Number of LaserWriters))
  489.  
  490. If the LaserWriter names are all the same length, the calculation is
  491. simplified to trunc(512/(22+length)).  The mean calculation (sum of
  492. name lengths / Number of LaserWriters) is not necessary in this case.
  493.  
  494. Note: Trunc indicates that decimal values should be ignored. i.e. A
  495. result of 12.8 indicates 12 LaserWriters.
  496.  
  497. The calculation can be used for any other type of AppleTalk device
  498. if the type length is known and the mean of the device names.
  499.  
  500. Current Chooser v3.3.1 selecting the Apple LaserWriter driver
  501. displays: 
  502.  
  503. Mean Name length        Max number of visible LaserWriters
  504.     30                             9
  505.     25                            10
  506.     20                            12
  507.     15                            13
  508.     10                            16
  509.      5                            18
  510.  
  511. Scott Winders
  512. internet: winders@aux.support.apple.com
  513. AppleLink: winders.s@applelink.apple.com
  514.  
  515.  
  516. Article 11087 of comp.sys.mac.system:
  517. Xref: midway comp.sys.novell:3569 comp.sys.mac.system:11087  
  518. comp.protocols.appletalk:3450
  519. Path:  
  520. midway!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!sample.eng.ohio-sta 
  521. te.edu!purdue!news.cs.indiana.edu!spool.mu.edu!mips!apple!aux.support.apple.co 
  522. m!winders
  523. From: winders@aux.support.apple.com (Scott Winders)
  524. Newsgroups: comp.sys.novell,comp.sys.mac.system,comp.protocols.appletalk
  525. Subject: Re: Apple Chooser Limitation problem???
  526. Message-ID: <58721@apple.Apple.COM>
  527. Date: 17 Oct 91 17:22:01 GMT
  528. Sender: daemon@Apple.COM
  529. Distribution: usa
  530. Organization: Apple Computer, Inc.
  531. Lines: 100
  532.  
  533. The following information pertains to the System 7 Chooser (version 7.0):
  534.  
  535. The Chooser DA window consists of four separate sections:
  536.  
  537. 1) The device type list. 
  538. 2) The AppleTalk zone list (visible only if there are multiple zones). 
  539. 3) The AppleTalk active/inactive controls.
  540. 4) The available devices name list.
  541.  
  542.  
  543. 1) The Chooser is able to display a maximum of 32 items in the
  544. Chooser device type list (Note: The System 6 limit was 16). This is the
  545. limit that is imposed by the Chooser itself, not by something
  546. interfering with the operation of the Chooser.
  547.  
  548. 2) The Chooser allocates memory for the zone list dynamically, up to
  549. 32K (Note: this is the same as the System 6 Chooser). Each entry in
  550. the zone list uses 1 byte of memory for each character in the zone name,
  551. plus 1 byte.  The Chooser uses this extra byte as a length byte.  For
  552. example, the 7-character zone name "My Zone" uses 8 bytes of memory: 7
  553. bytes for the characters and 1 byte for the length byte.  The maximum 
  554. length of a zone name is 32 characters.  A 32-character zone name uses 
  555. 33 bytes of memory.
  556.  
  557. Based on this information, if every zone had a 32-character name, it
  558. would be possible to have a maximum of 992 zones listed in the Chooser
  559. (32,768 / 33 = 992.97, remove the remainder).  The maximum number
  560. of zones that can be displayed in the Chooser is wholly dependent on 
  561. the length of the zone names being used.
  562.   
  563. 3) This one is self-explanatory; it controls whether or not AppleTalk
  564. is active (Note: this is the same as the System 6 Chooser).
  565.  
  566. 4) Determining the maximum number of visible Chooser device names:
  567.  
  568. The System 7 Chooser allocate a 32,768-byte buffer for the Chooser's
  569. list of available AppleTalk network device names (Note: the System 6
  570. Chooser allocated a 512-byte buffer).  Each name in the buffer is
  571. embedded in an AppleTalk Name Binding Protocol (NBP) packet received 
  572. by the Chooser from the selected device type.  The NBP packet is called
  573. a "lookup reply", and is sent in answer to the Chooser's lookup broadcast
  574. for the selected device.  An example is the selection of the device type
  575. LaserWriter driver, and the displayed LaserWriter object names.
  576.     
  577. The buffer space used by each returned AppleTalk device is the length of 
  578. the NBP reply packet returned by the device to the Chooser's lookup.
  579.  
  580.    NBP LaserWriter Lookup Reply Packet Definition
  581.    ----------------------------------------------
  582.    Function and Tuple Count:    1 byte
  583.    NBP ID:                      1 byte
  584.    Network Number:              2 bytes
  585.    Node ID:                     1 byte
  586.    Socket Number:               1 byte
  587.    Enumerator:                  1 byte
  588.    Object Field Length:         1 byte
  589.    Object:                      length of name
  590.    Type Field Length:           1 byte
  591.    Type:                       11 bytes for type "LaserWriter"
  592.    Zone Field Length:           1 byte
  593.    Zone:                        1 byte for zone "*" the NBP reply default
  594.    
  595. - ----------------------------------------------------------------------
  596.    TOTAL                       22 bytes + length of the LaserWriter name
  597.  
  598. A calculation for determining the maximum number of visible
  599. LaserWriters in a zone:
  600.  
  601. Number of visible LaserWriters = trunc(32,768/(22+(sum of name lengths /
  602. Number of LaserWriters))
  603.  
  604. If the LaserWriter names are all the same length, the calculation is
  605. simplified to trunc(32,768/(22+length)).  The mean calculation
  606. (sum of name lengths / Number of LaserWriters) is not necessary in this
  607. case.
  608.  
  609. (NOTE: Trunc indicates that decimal values should be ignored.  That
  610. is, a result of 780.19 indicates 780 LaserWriters.)
  611.  
  612. The calculation can be used for any other type of AppleTalk device, if
  613. the type length and the mean of the device names are known.
  614.  
  615.    System 7 Chooser selecting the Apple LaserWriter driver displays:
  616.  
  617.    Mean Name Length        Max Number of Visible LaserWriters
  618.    ----------------        ----------------------------------
  619.        32                           606
  620.        30                           630
  621.        25                           697
  622.        20                           780
  623.        15                           885
  624.        10                          1024
  625.         5                          1213
  626.  
  627. Copyright 1989 Apple Computer, Inc.
  628.  
  629.  
  630. Scott Winders
  631. internet: winders@aux.support.apple.com
  632. AppleLink: winders.s@applelink.apple.com
  633.  
  634.  
  635.  
  636.  
  637. ===========================================
  638.  
  639. Date: Fri, 19 Jun 1992 11:46 EST
  640. From: "Anthony C. Canike" <uunet!ecl.psu.edu!ACC>
  641. Subject: How many lasers in chooser?
  642. To: gregf@shaman.sps.mot.com
  643. X-Vms-To: in%"gregf@shaman.sps.mot.com"
  644.  
  645. Greg -
  646.  
  647. Here's some info I got from DEVSUPPORT at Apple.  Hope it helps.
  648.  
  649. - -----------
  650.  
  651. ...
  652.  
  653. Now back to your original question, what's going on with my
  654. printer?  As I mentioned previously, I suspect your network
  655. might be a prime contributor to your problems. However, if the
  656. network is not at fault I have a few Ideas that I will layout in
  657. just a second. To begin with, the IIg printers have proven to be
  658. very reliable over the network. Additionally Apple has not had
  659. reports of networking issues or problems as you describe. One
  660. possibility is that The Chooser is only able to display up to a
  661. maximum of 16 items in the Chooser device list.  This is the limit
  662. imposed by the Chooser itself, not by something interfering
  663. with the operation of the Chooser. 
  664.  
  665. How many devices  are in your zone? Is it possible your exceeding
  666. physical limits?   Further, the Chooser allocates memory for
  667. the zone list dynamically, up to 32K. Each entry in the zone list
  668. uses 1 byte of memory for each character in the zone name, plus 1
  669. byte.  The Chooser uses this extra byte as a length byte. For
  670. example, the 7-character zone name "My Zone" uses 8 bytes of
  671. memory: 7 bytes for the characters and 1 byte for the length
  672. byte.  The maximum length of a zone name is 32 characters.  A
  673. 32-character zone name uses 33 bytes of memory.   Based on this
  674. information, if every zone had a 32-character name, it would be
  675. possible to have a maximum of 992 zones listed in the Chooser
  676. (32K / 33 = 992.97, remove the remainder).  The maximum number of
  677. zones that can be displayed in the Chooser is wholly dependent
  678. on the length of the zone names being used.   System 5.x and 6.x
  679. Choosers allocate a 512-byte buffer for the Chooser's list of
  680. available AppleTalk network device names.  Each name in the 
  681. buffer is embedded in an AppleTalk Name Binding Protocol (NBP)
  682. packet received by the Chooser from the selected device type. 
  683. The NBP packet is called a "lookup reply", and is sent in answer
  684. to the Chooser's lookup broadcast for the selected device.  An
  685. example is the selection of the  device type LaserWriter
  686. driver, and the displayed LaserWriter object names.   When the
  687. 512-byte buffer is filled, this sometimes causes various
  688. names in the Chooser selection window to appear and disappear. 
  689. When selecting the LaserWriter driver in this situation, a
  690. LaserWriter disappears and another appears approximately
  691. once each 1.5 seconds. This happens whenever there are more
  692. names than the buffer can hold. Because the lookups are usually
  693. sent in a series, whenever a device does not fit on the display
  694. list, the first reply received from a previous lookup is
  695. removed and replaced with the name of the device that did not
  696. fit.  This process continues for each following lookup
  697. broadcasted by the Chooser. While the display list is also
  698. limited to 32 names, this is never reached when displaying
  699. devices like LaserWriters, because even with 1 character per
  700. name, the buffer is filled when 22 LaserWriters are displayed. 
  701.  
  702.    *If you encounter the constantly appearing and disappearing LaserWriter
  703.    situation, you can either break the network up into zones containing
  704.    smaller numbers of the particular device, or reduce the length of some or 
  705.    all of the device names.*
  706.  
  707. The buffer space used by each returned AppleTalk device is the length
  708. of the NBP reply packet returned by the device to the Chooser's lookup.
  709.  
  710.    NBP LaserWriter Lookup Reply Packet Definition
  711.    ----------------------------------------------
  712.    Function and Tuple Count:    1 byte
  713.    NBP ID:                      1 byte
  714.    Network Number:              2 bytes
  715.    Node ID:                     1 byte
  716.    Socket Number:               1 byte
  717.    Enumerator:                  1 byte
  718.    Object Field Length:         1 byte
  719.    Object:                      length of name
  720.    Type Field Length:           1 byte
  721.    Type:                       11 bytes for type "LaserWriter"
  722.    Zone Field Length:           1 byte
  723.    Zone:                        1 byte for zone "*" the NBP reply default
  724.    ----------------------------------------------------------------------
  725.    TOTAL                       22 bytes + length of the LaserWriter name
  726.  
  727.    A calculation for determining the maximum number of visible LaserWriters
  728.    in a zone:
  729.  
  730.  
  731.    Number of visible LaserWriters = trunc(512/(22+(sum of name lengths /
  732.    Number of LaserWriters))
  733.  
  734.  
  735.    If the LaserWriter names are all the same length, the calculation is
  736.    simplified to trunc(512/(22+length)).  The mean calculation (sum of name
  737.    lengths / Number of LaserWriters) is not necessary in this case.
  738.  
  739. (NOTE: Trunc indicates that decimal values should be ignored.  That is, a
  740. result of 12.8 indicates 12 LaserWriters.)
  741.  
  742.    The calculation can be used for any other type of AppleTalk device, if
  743.    the type length and the mean of the device names are known.
  744.  
  745. Chooser, selecting the Apple LaserWriter driver displays:
  746.  
  747.    Mean Name Length        Max Number of Visible LaserWriters
  748.    ----------------        ----------------------------------
  749.        30                             9
  750.        25                            10
  751.        20                            12
  752.        15                            13
  753.        10                            16
  754.         5                            18
  755.  
  756. I hope this information address your question. At this point you need to
  757. determine a few things:
  758.  
  759. .... 
  760.  
  761. ******************************************************************************
  762.  
  763.  
  764.  
  765. - ------------
  766.  
  767. +----------------------------------------------------------------------------- 
  768. +
  769. +  Tony Canike    KA3ZPH      acc@ecl.psu.edu                                  
  770. +
  771. +  814-237-0309x255 (day)                                                      
  772. +
  773. +----------------------------------------------------------------------------- 
  774. +
  775.  
  776. - -- 
  777. ......POSTED VIA MOTOROLA SPS NEWS SERVER.......
  778.  
  779. ---------------------------
  780.  
  781. From: zobkiw@world.std.com (Joe Zobkiw)
  782. Subject: appe info wanted
  783. Date: 19 Jun 92 12:24:36 GMT
  784. Organization: The World Public Access UNIX, Brookline, MA
  785.  
  786. I'm about to embark on a little tangent, writing a faceless background
  787. application. My first idea was to write an appe and communicate with it
  788. via AE from a "Configuration application" of some type. 
  789.  
  790. So, I look on the dev cd's and I find two examples of daemon applications
  791. but they are all of type APPL with the onlyBackground flag set.
  792.  
  793. I there any information available on writing an appe instead? What are
  794. the differences? Why would I want one instead of the other? please feel
  795. free to refer me to any documents to read, IM VI seems to say very little
  796. about this. Maybe I just missed it?
  797.  
  798. Thanks in advance and my apologies if this has been discussed.
  799.  
  800.  
  801. - -- 
  802. - -- joe zobkiw                      Internet: zobkiw@world.std.com
  803. - --                                      AOL: AFL Zobkiw  
  804. - -- mac.synthesis.MIDI.THINK C.OOP
  805. - -- asm.comm.networks.cool tunes...
  806.  
  807. +++++++++++++++++++++++++++
  808.  
  809. From: grobbins@Apple.COM (Grobbins)
  810. Date: 19 Jun 92 17:10:35 GMT
  811. Organization: Apple DTS
  812.  
  813. In article <Bq3EH1.53K@world.std.com> zobkiw@world.std.com (Joe Zobkiw) writes:
  814. >I there any information available on writing an appe instead? What are
  815. >the differences? Why would I want one instead of the other?
  816.  
  817. 'appe' is an application extension.  If your faceless background
  818. application is given the type appe instead of APPL, it will be routed
  819. to the Extensions folder if the user drags it onto the System folder,
  820. and it will be launched at startup time.  
  821.  
  822. So, to the user, an 'appe' looks just like an INIT.  From a developer's
  823. point of view, it's quite a bit easier to write and debug, since it is
  824. a normal (albeit somewhat restricted) application.
  825.  
  826. For more information see the article "Be Our Guest" in issue 9 of develop.
  827.  
  828. Grobbins         grobbins@apple.com
  829.  
  830. Usual disclaimers apply.
  831.  
  832. +++++++++++++++++++++++++++
  833.  
  834. From: zobkiw@world.std.com (Joe Zobkiw)
  835. Date: 20 Jun 92 00:18:32 GMT
  836. Organization: The World Public Access UNIX, Brookline, MA
  837.  
  838. >> For more information see the article "Be Our Guest" in issue 9 of develop.
  839.  
  840. Yea but...issue 9 talks only about APPLs with the onlyBackground bit set.
  841. I mentioned that in my previous post, I think. I need some information 
  842. on appe type things. Thanks.
  843.  
  844.  
  845. - -- 
  846. - -- joe zobkiw                      Internet: zobkiw@world.std.com
  847. - --                                      AOL: AFL Zobkiw  
  848. - -- mac.synthesis.MIDI.THINK C.OOP
  849. - -- asm.comm.networks.cool tunes...
  850.  
  851. ---------------------------
  852.  
  853. From: wjb@cscsun2.larc.nasa.gov (William J. Bene)
  854. Subject: Setting SIZE Resource from MPW
  855. Organization: NASA Langley Research Center, Hampton, VA  USA
  856. Date: Fri, 19 Jun 1992 16:25:45 GMT
  857.  
  858. How do you set the size resource for the suggested memory size for an 
  859. application in MPW?  I thought there might be an option on the Link or Rez 
  860. tools but I haven't found one.
  861.  
  862. ==============================
  863. William J. Bene
  864. Computer Sciences Corp.
  865. wjb@cscsun2.larc.nasa.gov
  866.  
  867.  
  868.  
  869. +++++++++++++++++++++++++++
  870.  
  871. From: peirce@outpost.SF-Bay.org (Michael Peirce)
  872. Date: 20 Jun 92 17:19:16 GMT
  873. Organization: Peirce Software
  874.  
  875.  
  876. In article <1992Jun19.162545.9701@news.larc.nasa.gov> (comp.sys.mac.programmer), wjb@cscsun2.larc.nasa.gov (William J. Bene) writes:
  877. > How do you set the size resource for the suggested memory size for an 
  878. > application in MPW?  I thought there might be an option on the Link or Rez 
  879. > tools but I haven't found one.
  880.  
  881. You use Rez and feed it a resource file definition (a .r file).  In
  882. that Rez file you declare a SIZE resource something like this:
  883.  
  884. resource 'SIZE' (-1) {
  885.     saveScreen,
  886.     acceptSuspendResumeEvents,
  887.     enableOptionSwitch,
  888.     canBackground,
  889.     doesActivateOnFGSwitch,
  890.     backgroundAndForeground,
  891.     dontGetFrontClicks,
  892.     ignoreAppDiedEvents,
  893.     is32BitCompatible,
  894.     isHighLevelEventAware,
  895.     localAndRemoteHLEvents,
  896.     notStationeryAware,                
  897.     reserved,
  898.     reserved,
  899.     reserved,
  900.     reserved,
  901.      575 * 1024,
  902.     2550 * 1024,
  903. };
  904.  
  905. - --  Michael Peirce      --   peirce@outpost.SF-Bay.org
  906. - --  Peirce Software     --   Suite 301, 719 Hibiscus Place
  907. - --  Makers of...        --   San Jose, California USA 95117
  908. - --                      --   voice: (408) 244-6554 fax: (408) 244-6882
  909. - --     SMOOTHIE         --   AppleLink: peirce & America Online: AFC Peirce
  910.  
  911. ---------------------------
  912.  
  913. From: stevep@wrq.com (Steve Poole)
  914. Subject: TMON typ# TMPL?
  915. Date: 19 Jun 92 18:12:59 GMT
  916. Organization: Walker Richer & Quinn
  917.  
  918. Anyone know where I can find a TMPL resource for creating and
  919. editing TMON typ# resources?  I'm kind of surprised to not find
  920. one on the distribution disks.  Thanks.
  921.  
  922. - --------------------------------------------------------------------------
  923. - - Internet: stevep@wrq.com  -  AOL: Spoole  -  INTEL 80x86: Just say NOP -
  924. - - "Nurse! Do let's pretend that I'm a hungry hyaena, and you're a bone!" -
  925. - --------------------------------------------------------------------------
  926.  
  927. +++++++++++++++++++++++++++
  928.  
  929. From: neal@farallon.com (Neal Trautman)
  930. Date: 20 Jun 92 15:29:19 GMT
  931. Organization: Farallon Computing, Inc.
  932.  
  933. In article <1992Jun19.181259.27085@u.washington.edu>, stevep@wrq.com (Steve Poole) writes:
  934. > Anyone know where I can find a TMPL resource for creating and
  935. > editing TMON typ# resources?  I'm kind of surprised to not find
  936. > one on the distribution disks.  Thanks.
  937.  
  938. If you really mean TMON Pro's 'Typ#' resource, the template
  939. is in the TMON application.  Simply open the TMON application
  940. in ResEdit and then you can use any of the 14 TMPL's that
  941. are in the application.
  942.  
  943. If you still can't find it, here it is:
  944.  
  945. 084E756D54797065734F434E54052A2A2A2A2A4C53544305466C616773484C4E470453697A65484C4E47024944484C4E47044E616D6545535452094E756D4669656C64734F434E54052D2D2D2D2D4C53544305466C61677348575244064F6666736574484C4E470453697A65484C4E470754797065204944484C4E47044E616D6545535452052D2D2D2D2D4C535445052A2A2A2A2A4C535445
  946.  
  947. It's in hex, simply copy the hex data, create a new Typ# TMPL resource
  948. in ResEdit, open it using the Hex Editor and paste in the hex data.
  949. If you close the resource and reopen it you should have a normal
  950. TMPL resource that should work.
  951. - --
  952. Neal Trautman
  953. Timbuktu Lead Software Engineer
  954. Farallon Computing, Inc.
  955. neal@farallon.com
  956.  
  957.  
  958. ---------------------------
  959.  
  960. From: karl@sparcom.com (Karl J. Smith)
  961. Subject: MacApp 3.0 and Dialog Views
  962. Date: 19 Jun 92 06:20:16 GMT
  963. Organization: Sparcom Corp., Corvallis/Tigard, Oregon
  964.  
  965. ViewEdit 3.0b2 is driving me crazy. I'm trying to create a dialog box
  966. with an 'OK' a 'Cancel' and some static text. I'm using the following
  967. snippet of code to display it:
  968.  
  969. pascal void TApplicationMine::MakeTheDialog(CommandNumber aCommandNumber)
  970. {
  971.     TWindow *    aWindow;
  972.     IDType        dismisser;
  973.  
  974. FailNIL(aWindow = gViewServer->NewTemplateWindow((short)aCommandNumber, NULL));
  975. dismisser = aWindow->PoseModally();
  976. if (dismisser == 'ok  ') {
  977.     do_something();
  978. }
  979. aWindow->Close();
  980. } // TApplicationMeld::MakeConnectionInstallDialog 
  981.  
  982. What happens is that the dialog is displayed on the screen, but clicking
  983. the buttons produce no result. I'm stuck there forever.
  984.  
  985. The buttons are 'ok  ' and 'cncl' and are mentiond
  986. as 'default item view' and 'cancel item view' in the TDialogView fields.
  987.  
  988. I've used ViewEdit to compare my views to the ModalBeepDialog in DemoDialogs,
  989. and it's the same as far as I can tell, except for the item positions.
  990. Why do the DemoDialogs views work, and not mine?
  991.  
  992. - -Karl Smith
  993. karl@sparcom.com
  994.  
  995. +++++++++++++++++++++++++++
  996.  
  997. From: sdk@cci632.cci.com (Stephen Knight)
  998. Date: 20 Jun 92 16:14:53 GMT
  999. Organization: [Computer Consoles, Inc., Rochester, NY
  1000.  
  1001. In article <548@sparcom.sparcom.com> karl@sparcom.com (Karl J. Smith) writes:
  1002. >ViewEdit 3.0b2 is driving me crazy. I'm trying to create a dialog box
  1003. >with an 'OK' a 'Cancel' and some static text. I'm using the following
  1004. >snippet of code to display it:
  1005. >
  1006. >pascal void TApplicationMine::MakeTheDialog(CommandNumber aCommandNumber)
  1007. >{
  1008. >    TWindow *    aWindow;
  1009. >    IDType        dismisser;
  1010. >
  1011. >FailNIL(aWindow = gViewServer->NewTemplateWindow((short)aCommandNumber, NULL));
  1012. >dismisser = aWindow->PoseModally();
  1013. >if (dismisser == 'ok  ') {
  1014. >    do_something();
  1015. >}
  1016. >aWindow->Close();
  1017. >} // TApplicationMeld::MakeConnectionInstallDialog 
  1018. >
  1019. >What happens is that the dialog is displayed on the screen, but clicking
  1020. >the buttons produce no result. I'm stuck there forever.
  1021. >
  1022. >The buttons are 'ok  ' and 'cncl' and are mentiond
  1023. >as 'default item view' and 'cancel item view' in the TDialogView fields.
  1024. >
  1025. >I've used ViewEdit to compare my views to the ModalBeepDialog in DemoDialogs,
  1026. >and it's the same as far as I can tell, except for the item positions.
  1027. >Why do the DemoDialogs views work, and not mine?
  1028. >
  1029.  
  1030.   Using ViewEdit, check your 'ok  ' and 'cncl' buttons.  In the TControl
  1031. part of the button the "Default Choice" needs to be set to 34 (mDismiss) for
  1032. PoseModally to know that it should close the dialog view and return
  1033. the control id.  In "Programmers Guide to MacApp", chapter 12, they don't
  1034. mention this little detail for PoseModally (they might in the 411 doc, but
  1035. I don't have it accessible right now).
  1036.   ViewEdit, on a button creation, sets the default choice to 3, which is
  1037. mButtonHit, assuming that your own DoEvent would be handling it.
  1038.  
  1039.   If you have a look in DemoDialogs.r, you'll find some lines similar to:
  1040.  
  1041. "Button {34, notHilited, notDimmed, sizeable, {4, 4, 4, 4}, 700, 
  1042. dontPreferOutline, kButtonLabels, 2}, "
  1043.  
  1044.   That "34" is the control object event number, which is how PoseModally
  1045. works for DemoDialogs.
  1046.  
  1047. Course, you've probably received 20 different messages like mine...after
  1048. you hunted down the offending section of code in MacApp.  Oh well, I tried.
  1049.  
  1050. steve knight
  1051. sdk@ccird2.cci.com
  1052.  
  1053. ---------------------------
  1054.  
  1055. From: johns@uuisis.isis.org (john smith)
  1056. Subject: Address error
  1057. Organization: International Shared Information Service (Ottawa)
  1058. Date: Sat, 20 Jun 92 15:17:36 GMT
  1059.  
  1060. I'm trying to write a code to put a single window with 5 dialog items
  1061. (byte mag, april 1992). I copied the code direct from the mag, modified it 
  1062. to get rid of the void().. It runs but I get an Address Error. I'm using 
  1063. think 5.0.. What do i have to look for to corrct this problem.. Can anyone 
  1064. write me a little code to put a window on my mac.. I'm very good with 
  1065. resedit but i'm a junior amateur programmer in C..  Can I go out with your 
  1066. sister? Can I borrow your car?? 
  1067. But seriously, any help would be greatly appreciated... Here's the code away 
  1068.  
  1069.  
  1070.  
  1071. #include <Types.h>
  1072. #include <QuickDraw.h>
  1073. #include <Windows.h>
  1074. #include <Dialogs.h>
  1075.  
  1076. #define DIAGNOSTIC_DIALOG       400
  1077. #define NIL                                     0L
  1078. #define IN_FRONT                        -1
  1079.  
  1080.         
  1081. Report_It()
  1082. {
  1083.         long var1,var2,var3,var4;
  1084.         
  1085.         int item1Str[10], item2Str[10], item3Str[10], item4Str[10];
  1086.         short           item;
  1087.         GrafPtr         oldPort;
  1088.         DialogPtr       timeDialog;
  1089.         
  1090.                 
  1091.                 NumToString(var1, item1Str);
  1092.                 NumToString(var2, item2Str);
  1093.                 NumToString(var3, item3Str);
  1094.                 NumToString(var4, item4Str);
  1095.                 ParamText(item1Str, item2Str, item3Str, item4Str);
  1096.                 timeDialog = GetNewDialog(DIAGNOSTIC_DIALOG,NIL,(WindowPtr)IN
  1097. _FRONT);
  1098.                 GetPort(&oldPort);
  1099.                 SetPort(timeDialog);
  1100.                 ModalDialog(NIL, &item);
  1101.                 SetPort(oldPort);
  1102.                 DisposDialog(timeDialog);
  1103.                 
  1104.         
  1105.  
  1106. }
  1107.         /*end Report_It*/
  1108.         
  1109.         
  1110. main()
  1111. {       
  1112.  
  1113.         
  1114.         Report_It();
  1115.         
  1116. }       
  1117.         
  1118.         
  1119.         
  1120.         
  1121.         
  1122.         
  1123.         
  1124.  
  1125. Thanks in advance...JOHNS.uuisis
  1126.  
  1127.  
  1128. +++++++++++++++++++++++++++
  1129.  
  1130. Organization: University of Illinois at Chicago
  1131. Date: Saturday, 20 Jun 1992 21:31:27 CDT
  1132. From: <U11852@uicvm.uic.edu>
  1133.  
  1134.  Do the "GetPort" call before you do the GetNewDialog call. That alone,
  1135. can cause problems, cause I think I've seen somewhere that GetNewDialog
  1136. DOES a SetPort. That way, after the call to DisposeDialog, you would not
  1137. re-set the port to garbage as in this case, since the dialog has been
  1138. disposed of.
  1139.  Hope it helps.
  1140. ***** G.V.Rasani
  1141. Breaking up with somebody, should appear on your resume...
  1142. *****
  1143.  
  1144. ---------------------------
  1145.  
  1146. End of C.S.M.P. Digest
  1147. **********************
  1148.